#include<iostream>

using namespace std;
using ll = long long;
int n, m, c;
const int N = 1e3 + 10;
ll f[N][N];
int main()
{
    // zdl:: 这道题目就是在使用前缀和的基础是哪个进行枚举
    cin >> n >> m >> c;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            int x; cin >> x;
            f[i][j] = f[i][j - 1] + f[i - 1][j] - f[i - 1][j - 1] + x;
        }
    }
    // zdl:: 可能是数据范围溢出
    ll ret = -0x3f3f3f3f * 2;
    int x, y;

    for (int i = 1; i <= n - c + 1; i++)
    {
        for (int j = 1; j <= m - c + 1; j++)
        {
            int i1 = i + c - 1, j1 = j + c - 1;
            ll t = f[i1][j1] - f[i1][j - 1] - f[i - 1][j1] + f[i - 1][j - 1];
            if (t > ret)
            {
                ret = t;
                x = i; y = j;
            }
        }
    }

    cout << x << " " << y << endl;
    return 0;
}